<{include file='public/head'}>
<div class="layui-body">
	<div class="layui-tab layui-tab-brief">
		  <ul class="layui-tab-title">
			<li><a href="<{:url('index')}>"><{$MenuName}>列表</a></li>
			<li class="layui-this"><a href="<{:url('edit')}>"><{$MenuName}>修改</a></li>
		  </ul>
		   <div class="layui-tab-content">
				<form class="layui-form layui-form-pane" action="<{:url('edit')}>" enctype="multipart/form-data" method="post">
					<div class="layui-form-item">
	                     <label class="layui-form-label">内容模型</label>
	                     <div class="layui-input-inline">
	                     	 <select name="TypeMcode" required lay-verify="required"> <!--lay-verify="required"--->
		                        <option value="">请选择模型</option>
								<{volist name="$models" id="value"}>
								 <option value="<{$value->mcode}>" <{if condition="$value->mcode eq $Info.TypeMcode"}>selected<{/if}>><{$value->name}></option>
							   <{/volist}>
		                    </select>
	                     </div>
	                </div>
					<div class="layui-form-item">
                     <label class="layui-form-label">选择分类</label>
                     <div class="layui-input-inline">
                     	 <select name="TypePID" lay-verify="required" class="layui-input-inline">
	                        <option value="0">顶级分类</option>
							 <{volist name="subinfo" id="value"}>
	                        	<option value="<{$value.TypeID}>" <{if condition="$value.TypeID eq $Info.TypePID"}>selected<{/if}>><{$value.TypeName}></option>
	                        <{/volist}>
	                    </select>
                     </div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">分类名称</label>
						<div class="layui-input-inline inputTextWidth">
							<input type="text" name="TypeName" value="<{$Info.TypeName}>" size="40" class="layui-input"/>
						</div>
						<div class="layui-form-mid layui-word-aux">必填</div>
					</div>
					 
				   
					<div class="layui-form-item">
						<label class="layui-form-label">排序</label>
						<div class="layui-input-inline inputTextWidth">
							<input type="text" name="TypeSort" value="0" value="<{$Info.TypeSort}>" size="40" class="layui-input"/>
						</div>
					</div>
					<div class="layui-form-item">
						<input type="hidden" name="TypeID" value="<{$Info.TypeID}>"/>
						<input type="hidden" name="TypePath" value="<{$Info.TypePath}>">
						<button class="layui-btn" type="submit">提交保存</button>
					</div>
				</form>
		</div>
	</div> 
</div>
<{include file="public/foot"}>
<script>
    layui.use('upload', function(){
        var $ = layui.jquery
            ,upload = layui.upload;
    });
	function whotype(Url) {
		layer.open({
			title:'选择分类',
			type: 2,
			area: ['80%', "85%"],
			content:Url,
			shade: [0.8, '#393D49'],  
			success: function(layero, index) {
				layer.iframeAuto(index);
			}
		});
	}
</script>